<?php
require_once(dirname(__FILE__) . '/app.php');

if(!$INI['db']['host']){
	redirect( WEB_ROOT . '/install.php' );
}



$menuList = array();
if( $defaultShopId < 1 ){
	$menuList = Service::GetAll();
}else{
	$bookedList = Service::GetAllByShopId($defaultShopId);
}

$shopList = Shop::GetAllShops();

$serviceList = Service::GetAll();
$serviceIdList = array();
foreach ($serviceIdList as $k => $v){
	$serviceIdList[$v['id']] = $v['service_name'];
}

$deviceList = Devices::GetAll();
$deviceIdList = array();
foreach ($deviceIdList as $k => $v){
	$deviceIdList[$v['id']] = $v['device_name'];
}

$serviceList = Service::GetAll();
$serviceIdList = array();
foreach($serviceList as $k => $v){
	$serviceIdList[ $v['id'] ] = $v['service_name'];
}

if( $_GET['id'] > 0 ){
	$menu = Service::getById($_GET['id']);
	include template('menu');
	exit;
}


include template('menu_list');
//include template('subscribe');
